<?php
    DEFINE('H1', 'Date Manipulation');
    DEFINE('TITLE','Dealing with Dates');
    require('includes/header.php');
?>    
    <h2><?PHP echo H1 ?></h2>

<?php

	echo "It is now " . mktime();
		wrt("");

	$rightNow = date("H:i d F Y", mktime());
		wrt("It is now: $rightNow");

	$rightNow = date("H:i d M Y", mktime());
		wrt("It is now: $rightNow");

	$rightNow = date("H:i l M Y", mktime());
		wrt("It is now: $rightNow");
	
	$rightNow = date("H:i d F Y", mktime());
		wrt("It is now: $rightNow");
		wrt("");
	
	$rightNow = date("Ymd-H:i:s", mktime());
		wrt("Timestamp Fmt: $rightNow");
		wrt("");
	
	$now = getdate();
		wrt("getdate using print_r");
		print_r($now);
		wrt("");

		wrt("");
		wrt("Now var_dump");
		var_dump($now);
		wrt("");
	
		wrt("");
		wrt("Testing the implode() function");
	$dt = implode(' and ' , $now);
		echo "The imploded string it ($dt)";
		wrt("");

		wrt("");
		wrt("Testing the implode() function");
	$str = "1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23";
		wrt ("The string is($str)");
		wrt("");
	$ary = explode(',', $str);
		wrt("The $str array has" .count ($ary) . " elements");
		wrt("This is the exploded array...");
		print_r($ary);
		wrt("");



?>

<?php
    require('includes/footer.php');
?>